$(function(){
	
	$("#all").css({
		"margin":"50px auto",
		"width":"900px"
	});
	
	$(".fr").css({
		"float":"right"
	});
	
	$("table").css({
		"margin":"0 auto",
		"width":"100%"
	});
	
	$("tr:even").css({
		"background-color":"#EBF6FA"
	});
	
	$("td").css({
		"text-align":"center"
	});
	

	
	// 分页显示请求
	$(".pages").unbind("click").bind("click", function(){
		var op = $(this).html();
		var curr = $("#currPage").html();
		
		if(op == "首页"){
			curr = 1;
		}else if(op == "尾页"){
			curr = $("#sumPage").html();
		}else if(op == "上一页"){
			if($("#currPage").html() == 1){
				curr = 1;
			}else{
				curr = $("#currPage").html() - 1;
			}
		}else if(op == "下一页"){
			if($("#currPage").html() == $("#sumPage").html()){
				curr == $("#sumPage").html();
			}else{
				curr = parseInt($("#currPage").html()) + 1;
			}
		}
		
		$.ajax({
			url:"showAll.action",
			type:"post",
			data:{"curr":curr},
			dataType:"html",
			async:true,
			success:function(result){
				$("#fun").html(result);
			}
			
		});
	});
	
	
});

